import request from '@/utils/request'

export default {
    list() {
        return request({
            url: '/user/list',
            method: 'get'
        })
    },

    // search(page, size, searchMap) {
    //     return request({
    //         url: `/supplier/list/search/${page}/${size}`,
    //         method: 'post',
    //         data: searchMap
    //     })
    // },

    add(pojo) {
        return request({
            url: '/user',
            method: 'post',
            data: pojo
        })
    },

    getById(id) {
        return request({
            url: `/user/${id}`,
            method: 'get'
        })
    },
    // 更新操作
    update(pojo) {
        return request({
            url: `/user`,
            method: 'put',
            data: pojo
        })
    },

    //删除
    deleteById(id) {
        return request({
            url: `/user/${id}`,
            method: 'delete'
        })
    }
}